
<div class="col-md-12">
    <section class="panel panel-default">
        <div class="panel-heading">
            <!--<h5>机器人列表</h5>-->
            <div class="panel-search form-inline" >
                <div class="input-group">
                    <span class="input-group-addon" ng-hide="vm.queryParams.name">机器人编号：</span>
                    <input class="form-control" style="float:left;width:200px" ng-model="vm.queryParams.robotNumber" ui-keydown="{'enter': 'vm.search()'}">
                </div>
                <div class="input-group">
                    <span class="input-group-addon" ng-hide="vm.queryParams.name">分组名称：</span>
                    <input class="form-control" style="float:left;width:200px" ng-model="vm.queryParams.groupId" ui-keydown="{'enter': 'vm.search()'}">
                </div>
                <div class="input-group" style="float: right;">
                    <button type="button" class="btn btn-primary" ng-click="vm.search()">
                        <i class="fa fa-fw fa-search"></i>查询
                    </button>
                </div>
            </div>
        </div>
        <table class="am-fade-and-scale table table-hover" >
            <thead>
            <tr>
                <th style="width: 10%;" ng-click="vm.sorter.reorder('trueName')">
                    机器人编号<i class="text-info fa fa-fw" ng-show="vm.sorter.order === 'robotNumber'" ng-class="{'fa-sort-down': vm.sorter.reverse, 'fa-sort-up': !vm.sorter.reverse}"></i>
                </th>
                <th style="width: 40%;" ng-click="vm.sorter.reorder('aliasName')">
                    当前分组<i class="text-info fa fa-fw" ng-show="vm.sorter.order === 'conpanyId'" ng-class="{'fa-sort-down': vm.sorter.reverse, 'fa-sort-up': !vm.sorter.reverse}"></i>
                </th>
                <th style="width: 40%;" ng-click="vm.sorter.reorder('aliasName')">
                    当前计划<i class="text-info fa fa-fw" ng-show="vm.sorter.order === 'conpanyId'" ng-class="{'fa-sort-down': vm.sorter.reverse, 'fa-sort-up': !vm.sorter.reverse}"></i>
                </th>
                <th style="width: 10%;">操作</th>
            </tr>
            </thead>
            <tbody class="text-muted">
                <tr ng-repeat="robot in vm.robots | orderBy : vm.sorter.order : vm.sorter.reverse track by $index">
                    <td>{{robot.robotNumber}}</td>
                    <td ng-switch on="robot.groupName || 'null'">
                        <span ng-switch-when="null">无<button style="font-size: 15px;background: transparent;border: 0;" ng-click="vm.robotAddInGroup(robot)" class="fa fa-plus-square"></button></span>
                        <span ng-switch-default>{{robot.groupName}}</span>
                    </td>
                    <td ng-switch on="robot.planName || 'null'">
                        <span ng-switch-when="null">无</span>
                        <span ng-switch-default>{{robot.planName}}</span>
                    </td>
                    <td>
                        <a ng-click="vm.delete(robot)">删除</a>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="panel-footer text-center" ng-if="vm.isLoaded">
            <uib-pagination class="pagination-sm" ng-model="vm.queryParams.page" ng-change="vm.search()" total-items="vm.totalItems" max-size="vm.queryParams.size"></uib-pagination>
        </div>
    </section>
</div>
<div>
    <script type="text/ng-template" id="myModalContent.html">
        <div>
            <div class="modal-header">
                <h4 class="modal-title">是否确认删除该机器人？</h4>
            </div>
            <div class="modal-footer">
                <button class="btn btn-primary" type="button" ng-click="ok()">确认</button>
                <button class="btn btn-warning" type="button" ng-click="cancel()">取消</button>
            </div>
        </div>
    </script>

    <script type="text/ng-template" id="tipsModel.html">
        <div class="modal-header">
            <h4 class="modal-title">{{resultMsg}}</h4>
        </div>
        <div class="modal-footer">
            <button class="btn btn-primary" type="button" ng-click="ok()">确认</button>
        </div>
    </script>
